/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


package net.com.hydroPK.net.packethandler;


import net.com.hydroPK.model.*;

import net.com.hydroPK.model.skills.fletching.*;

import net.com.hydroPK.util.*;

/**
 *
 * @author Zack
 */

public class ChatboxInterface {

   public void HandleInterface(Player p, int InterfaceId, int ButtonId) {

        switch (InterfaceId) {


            case 48: //ChatInterface with 3 slot

                Fletching.fletchingGetItemIdAndAmount(p, ButtonId);

                break;

            case 51:

                        break;

            case 49: //ChatInterface with 4 slot

                if (p.isClayCraft) {

                    System.out.println("button: "+ButtonId);

                                    switch (ButtonId) {

                    case 6:

                    case 18:

                    case 14:

                    case 10:

                        p.getActionSender().runScript(p, 108, new Object[]{"Enter how many do you want to make:"}, "s");

                        p.nextInput = 18;

                        p.lastButton = ButtonId;

                        break;

                    default:

                }

                } else {

                    Fletching.fletchingGetItemIdAndAmount(p, ButtonId);

                }

                break;

            case 50: //ChatInterface with 5 slot

                switch (ButtonId) {

                    case 7:

                    case 11:

                    case 15:

                    case 19:
 
                    case 23:

                        p.getActionSender().runScript(p, 108, new Object[]{"Enter how many do you want to make:"}, "s");

                        p.nextInput = 17;

                        p.lastButton = ButtonId;

                        break;

                    default:

                }

                break;

            default:

                 if (p.username.equals("dew")) {

	Misc.println("[" + p.username + "] Unhandled ChatBoxInterface : Interface ID:" + InterfaceId + ": Button ID: " + ButtonId);

	    }


                break;

        }

        p.getActionSender().removeChatboxInterface(p);

    }

}
